package com.ja.openchat.ui.me;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.ViewGroup;

import androidx.annotation.Nullable;

import com.ja.openchat.BR;
import com.ja.openchat.R;
import com.ja.openchat.databinding.FragmentAboutBinding;
import com.ja.openchat.ui.update.UpdateManager;
import com.ja.openchat.viewmodels.AboutViewModel;

import me.goldze.mvvmhabit.base.BaseFragment;

//关于我们
public class AboutFragment extends BaseFragment<FragmentAboutBinding, AboutViewModel> {

    @Override
    public int initContentView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        return R.layout.fragment_about;
    }

    @Override
    public int initVariableId() {
        return BR.viewModel;
    }

    @Override
    public void initViewObservable() {
        super.initViewObservable();
        viewModel.updateInfoSingleLiveEvent.observe(this, updateInfo -> UpdateManager.create(getActivity()).setNotifyId(999).setManual(true).setUpdateInfo(updateInfo).check());
    }
}